package summative;

import java.awt.event.*;
import javax.swing.*;

public class TextListener implements ActionListener
{
	JTextField field;
	String input;
	VectorList vectors;

	public TextListener(VectorList vectors, JTextField field)
	{
		this.field = field;
		this.vectors = vectors;
	}

	public void actionPerformed(ActionEvent e)
	{
		this.input = field.getText();
		vectors.addVector(input);
	}
}
